#pragma once

#include <Ogre.h>
#include "BaseShip.h"
#include "BtOgrePG.h"
#include "BtOgreGP.h"
#include "BtOgreExtras.h"
#include "ExtendedCamera.h"

using namespace Ogre;

enum PlayerNumber
{
	Player_One,
    Player_Two,
	Player_Three,
	Player_Four,
};

class BasePlayer
{
public:
	BasePlayer(Ogre::String name, PlayerNumber pNumber, Ogre::ColourValue pColour, Ogre::Vector3 pPos, Ogre::SceneManager* sceneMgr);
	~BasePlayer(void);

	void rotateLeft();
	void rotateRight();
	void moveLeft();
	void moveRight();
	void moveUp();
	void moveDown();
	Ogre::Vector3 getWorldPosition(); 
	//void jump(btRigidBody *shape, btDynamicsWorld *pWorld);
	//void doJump();
	void tickCallBack();
	void updatePlayer(double timeSinceLastFrame);
	void updateTarget(Ogre::Vector3 target);
	void BasePlayer::updateCamera(Degree yaw, Degree pitch);

	void firePrimaryWeapon();
	void fireSecondaryWeapon();

	void changeDebugVisibility();

	//btRigidBody					*m_PlayerBody;
	//Ogre::SceneNode*			m_PlayerNode;
	BaseShip					*m_PlayerShip;
	ExtendedCamera				*m_ExCamera;
	Ogre::Camera				*m_PlayerCamera;

private:

	//Ogre::Entity*				m_PlayerEntity;
	Ogre::Vector3				m_TranslateVector;
	Ogre::Real					m_MoveSpeed;
	Ogre::Degree				m_RotateSpeed;
	float						m_MoveScale;
	Ogre::Degree				m_RotScale;

	PlayerNumber				m_PlayerNumber;

	Ogre::SceneManager*			m_pSceneMgr;

    //btCollisionShape			*m_PlayerShape;
	//BtOgre::RigidBodyState *	playerState;
	int							m_MaxSpeed;
};


